/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * MyTwitter.java
 *
 * Created on 23/Set/2009, 23:35:20
 */
package cliente.gui;

import cliente.Cliente;
import cliente.ClienteRMI;
import cliente.GereOperacoes;
import common.*;
import java.awt.Color;

/**
 *
 * @author Daniel e ziza
 */
public class MyTwitter extends javax.swing.JFrame {

    private String username;
    private GereOperacoes gestor = null;
    private String[] buffer_foll = null;
    private String[] buffer_search = null;
    private String[] buffer_mensagem = null;
    private String[] buffer_minha_mensagem = null;

    /** Creates new form MyTwitter */
    public MyTwitter(String un, GereOperacoes gestor) {
        initComponents();
        newmsg_lbl.setVisible(false);
        username = un;
        username_txt.setText(username);
        this.gestor = gestor;
    }

    public MyTwitter() {
        initComponents();
    }

    public String getNick() {
        return username;
    }

    public void setNick(String nick) {
        username = nick;
    }

    public void setNewMessageLabel() {

        if (gestor.isDisplayMode()) {
            newmsg_lbl.setVisible(false);
        } else {
            newmsg_lbl.setVisible(true);
        }
    }

    public void setBufferFolling(String[] buffer_foll) {
        this.buffer_foll = buffer_foll;

        String constroiOu = "";
        for (int i = 1; i < buffer_foll.length; i++) {
            System.out.println("Amigos" + buffer_foll[i]);
            constroiOu = constroiOu + buffer_foll[i] + "\n";
        }
        timetable_txt.setText(constroiOu);
    }

    public void setBufferMenssagens(String[] buffer_mensagem) {
        this.buffer_mensagem = buffer_mensagem;

        String constroiOu = "";
        for (int i = 1; i < buffer_mensagem.length; i++) {
            System.out.println("Amigo:" + buffer_mensagem[i]);
            constroiOu = constroiOu + buffer_mensagem[i] + "\n";
        }
        timetable_txt.setText(constroiOu);
    }

    public void setBufferMinhasMenssagens(String[] buffer_minha_mensagem) {

        String constroiOu = "";
        for (int i = 1; i < buffer_minha_mensagem.length; i++) {
            System.out.println("Amigo:" + buffer_minha_mensagem[i]);
            constroiOu = constroiOu + buffer_minha_mensagem[i] + "\n";
        }
        timetable_txt.setText(constroiOu);
    }

    public void setBufferSearch(String[] buffer_search) {

        for (int i = 1; i < buffer_search.length; i++) {
            list1.add(buffer_search[i]);
        }
        buffer_search = null;
    }

    public void setDetails(String nome, String local) {
        nameSearched_txt.setText(nome);
        localSearched_txt.setText(local);
    }

    public void efectuaErro() {

        if (!gestor.getConexao().getEstado().equalsIgnoreCase("Ligado")) {
            new Erro("Conexao", "Ligacao com o servidor em baixo.\nTentar fazer ligacao...");
        }
    }
//
//    public void setNewMessage() {
//        newmsg_lbl.setVisible(true);
//    }

    public void limpaCampos() {
        tweet_txt.setText("");
        timetable_txt.setText("");
        searchUsr_txt.setText("");
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel8 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        label = new javax.swing.JLabel();
        nameSearched_txt = new javax.swing.JLabel();
        followers_button = new javax.swing.JButton();
        jLabel9 = new javax.swing.JLabel();
        txt_txt = new javax.swing.JScrollPane();
        timetable_txt = new javax.swing.JTextArea();
        tweet_txt = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        localSearched_txt = new javax.swing.JLabel();
        follow_button = new javax.swing.JButton();
        searchUsr_txt = new javax.swing.JTextField();
        tweet_button = new javax.swing.JButton();
        search_button = new javax.swing.JButton();
        logout_button = new javax.swing.JButton();
        username_txt = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        timeline_button = new javax.swing.JButton();
        following_button = new javax.swing.JButton();
        list1 = new java.awt.List();
        mytwitts_btn = new javax.swing.JButton();
        char_nbr = new javax.swing.JLabel();
        newmsg_lbl = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("MyTwitter");

        jLabel8.setText("Name:");

        jLabel7.setText("Results:");

        label.setText("Timeline:");

        followers_button.setText("Followers");
        followers_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                followers_buttonActionPerformed(evt);
            }
        });

        jLabel9.setText("Localization:");

        timetable_txt.setColumns(20);
        timetable_txt.setEditable(false);
        timetable_txt.setLineWrap(true);
        timetable_txt.setRows(5);
        timetable_txt.setWrapStyleWord(true);
        txt_txt.setViewportView(timetable_txt);

        tweet_txt.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                tweet_txtKeyTyped(evt);
            }
        });

        jLabel2.setText("Twitter:");

        jLabel1.setText("MyTwitter");

        follow_button.setText("Follow");
        follow_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                follow_buttonActionPerformed(evt);
            }
        });

        tweet_button.setText("Tweet!!!");
        tweet_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                tweet_buttonActionPerformed(evt);
            }
        });

        search_button.setText("Search");
        search_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                search_buttonActionPerformed(evt);
            }
        });

        logout_button.setText("Logout");
        logout_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                logout_buttonActionPerformed(evt);
            }
        });

        username_txt.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);

        jLabel6.setText("Search:");

        timeline_button.setText("Timeline");
        timeline_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                timeline_buttonActionPerformed(evt);
            }
        });

        following_button.setText("Following");
        following_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                following_buttonActionPerformed(evt);
            }
        });

        list1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                list1MouseReleased(evt);
            }
        });
        list1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                list1ActionPerformed(evt);
            }
        });

        mytwitts_btn.setText("My Twitts");
        mytwitts_btn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mytwitts_btnActionPerformed(evt);
            }
        });

        char_nbr.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        char_nbr.setText("0 chars");

        newmsg_lbl.setForeground(new java.awt.Color(255, 0, 0));
        newmsg_lbl.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        newmsg_lbl.setText("New message has arrived!");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(label, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(91, 91, 91)
                                .addComponent(newmsg_lbl, javax.swing.GroupLayout.PREFERRED_SIZE, 183, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(99, 99, 99)
                                .addComponent(char_nbr, javax.swing.GroupLayout.DEFAULT_SIZE, 92, Short.MAX_VALUE))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jLabel1)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 372, Short.MAX_VALUE)
                                .addComponent(username_txt, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jLabel2)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(tweet_txt, javax.swing.GroupLayout.PREFERRED_SIZE, 471, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(logout_button, javax.swing.GroupLayout.DEFAULT_SIZE, 77, Short.MAX_VALUE)
                            .addComponent(tweet_button)))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(txt_txt, javax.swing.GroupLayout.DEFAULT_SIZE, 339, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(list1, javax.swing.GroupLayout.DEFAULT_SIZE, 268, Short.MAX_VALUE)
                            .addComponent(mytwitts_btn, javax.swing.GroupLayout.DEFAULT_SIZE, 268, Short.MAX_VALUE)
                            .addComponent(timeline_button, javax.swing.GroupLayout.DEFAULT_SIZE, 268, Short.MAX_VALUE)
                            .addComponent(following_button, javax.swing.GroupLayout.DEFAULT_SIZE, 268, Short.MAX_VALUE)
                            .addComponent(followers_button, javax.swing.GroupLayout.DEFAULT_SIZE, 268, Short.MAX_VALUE)
                            .addComponent(jLabel7)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jLabel6)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(searchUsr_txt, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(search_button, javax.swing.GroupLayout.DEFAULT_SIZE, 77, Short.MAX_VALUE))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jLabel9)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(localSearched_txt, javax.swing.GroupLayout.DEFAULT_SIZE, 183, Short.MAX_VALUE))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jLabel8)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(nameSearched_txt, javax.swing.GroupLayout.DEFAULT_SIZE, 219, Short.MAX_VALUE))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                .addGap(185, 185, 185)
                                .addComponent(follow_button)))))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel1)
                    .addComponent(username_txt, javax.swing.GroupLayout.PREFERRED_SIZE, 11, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addComponent(logout_button, javax.swing.GroupLayout.PREFERRED_SIZE, 13, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(1, 1, 1)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(tweet_txt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(tweet_button))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(label, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(newmsg_lbl, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(char_nbr, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(timeline_button)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(following_button)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(followers_button)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(mytwitts_btn)
                        .addGap(9, 9, 9)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(searchUsr_txt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(search_button)
                            .addComponent(jLabel6))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel7)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(list1, javax.swing.GroupLayout.DEFAULT_SIZE, 103, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel8)
                            .addComponent(nameSearched_txt, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel9)
                            .addComponent(localSearched_txt, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(follow_button))
                    .addComponent(txt_txt, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 375, Short.MAX_VALUE))
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void followers_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_followers_buttonActionPerformed
        // TODO add your handling code here:
        if(gestor.isDisplayMode())
            gestor.setDisplayMode(false);
        //this.setNewMessageLabel();

        label.setText("Followers:");
        timetable_txt.setText("");

        if (!gestor.getConexao().getEstado().equalsIgnoreCase("Ligado")) {
            efectuaErro();
        } else {
            OpFollowers followers = new OpFollowers(username, "Followers");
            gestor.getEnvia().setArrayList(followers);
        }
}//GEN-LAST:event_followers_buttonActionPerformed

    private void tweet_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tweet_buttonActionPerformed
        // TODO add your handling code here:

        gestor.setDisplayMode(false);

        if (tweet_txt.getText().length() <= 140) {
            Menssagem sms_envia = new Menssagem(username, "Tweet:" + tweet_txt.getText());
            gestor.getEnvia().setArrayList(sms_envia);
            tweet_txt.setText("");
            char_nbr.setText("0 chars");
        }
}//GEN-LAST:event_tweet_buttonActionPerformed

    private void logout_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_logout_buttonActionPerformed
        // TODO add your handling code here:
        this.setVisible(false);
        //gestor.setLogin(new Login(this.gestor, gestor));
        //Login login = new Login();
        //login.setVisible(true);

        if (gestor.getEnvia().getArraySMS().size() > 0) {
            OpFicheiro grava = new OpFicheiro(gestor);
            grava.gravaBuffer(gestor.getEnvia().getArraySMS());
        }

        //-------------------------------------- FIM

        if(gestor.getConexao().getEstado().equalsIgnoreCase("Ligado")){
            Menssagem sms_envia = new Menssagem(username, "Loggout");
            gestor.getEnvia().setArrayList(sms_envia);
            gestor.getConexao().setEstado("Off");
        }

        gestor.fazLogout();
        System.out.println("Depois do fazLoggout!!!");
        if (gestor.getConexao().getEstado().equalsIgnoreCase("Off")) {       
            if (gestor.getConexao().getPort() != ClienteRMI.mainPort) {
                Cliente.arrancaLigacao(gestor, gestor.getLogin(), 0);
            } else {
                ClienteRMI.arrancaLigacao(gestor, gestor.getLogin(), 0);
            }
        }

}//GEN-LAST:event_logout_buttonActionPerformed

    private void timeline_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_timeline_buttonActionPerformed
        // TODO add your handling code here:

        label.setText("Timeline:");
        timetable_txt.setText("");
        gestor.setDisplayMode(true);
        setNewMessageLabel();

        if (!gestor.getConexao().getEstado().equalsIgnoreCase("Ligado")) {
            efectuaErro();
        } else {
            Menssagem sms_envia = new Menssagem(username, "Ver mensagens");
            gestor.getEnvia().setArrayList(sms_envia);
        }

}//GEN-LAST:event_timeline_buttonActionPerformed

    private void following_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_following_buttonActionPerformed
        // TODO add your handling code here:
        if(gestor.isDisplayMode())
            gestor.setDisplayMode(false);
        //this.setNewMessageLabel();

        label.setText("Following:");
        timetable_txt.setText("");
        

        if (!gestor.getConexao().getEstado().equalsIgnoreCase("Ligado")) {
            efectuaErro();
        } else {

            OpFollowing following = new OpFollowing(username, "following");
            gestor.getEnvia().setArrayList(following);
        }

}//GEN-LAST:event_following_buttonActionPerformed

    private void search_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_search_buttonActionPerformed
        // TODO add your handling code here:

        if(gestor.isDisplayMode())
            gestor.setDisplayMode(false);
        //this.setNewMessageLabel();

        if (!gestor.getConexao().getEstado().equalsIgnoreCase("Ligado")) {
            efectuaErro();
        } else {
            list1.removeAll();
            System.out.println("A pesquisar:" + searchUsr_txt.getText());
            OpSearch search = new OpSearch(username, searchUsr_txt.getText(), "search");
            gestor.getEnvia().setArrayList(search);
            searchUsr_txt.setText("");
        }

    }//GEN-LAST:event_search_buttonActionPerformed

    private void mytwitts_btnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mytwitts_btnActionPerformed
        // TODO add your handling code here:

        if(gestor.isDisplayMode())
            gestor.setDisplayMode(false);
        //this.setNewMessageLabel();

        label.setText("My Twitts:");
        timetable_txt.setText("");

        if (!gestor.getConexao().getEstado().equalsIgnoreCase("Ligado")) {
            efectuaErro();
        } else {
            Menssagem sms_own = new Menssagem(username, "Minhas");
            gestor.getEnvia().setArrayList(sms_own);
        }
    }//GEN-LAST:event_mytwitts_btnActionPerformed

    private void follow_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_follow_buttonActionPerformed
        // TODO add your handling code here:
        if(gestor.isDisplayMode())
            gestor.setDisplayMode(false);
        //this.setNewMessageLabel();

        if (!gestor.getConexao().getEstado().equalsIgnoreCase("Ligado")) {
            efectuaErro();
        } else {
            OpFollow follow = new OpFollow(username, list1.getItem(list1.getSelectedIndex()), "Segue");
            gestor.getEnvia().setArrayList(follow);
        }
    }//GEN-LAST:event_follow_buttonActionPerformed

    private void list1MouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_list1MouseReleased
        // TODO add your handling code here:
        OpDetails details = new OpDetails(username, list1.getItem(list1.getSelectedIndex()), "Detalhes");
        gestor.getEnvia().setArrayList(details);

    }//GEN-LAST:event_list1MouseReleased

    private void tweet_txtKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tweet_txtKeyTyped
        // TODO add your handling code here:
        char_nbr.setText((tweet_txt.getText().length() + 1) + " chars");
        if ((tweet_txt.getText().length() + 1) > 140) {
            char_nbr.setForeground(Color.red);
        }
        if ((tweet_txt.getText().length() + 1) <= 140) {
            char_nbr.setForeground(Color.black);
        }
    }//GEN-LAST:event_tweet_txtKeyTyped

    private void list1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_list1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_list1ActionPerformed
    /**
     * @param args the command line arguments
     */
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel char_nbr;
    private javax.swing.JButton follow_button;
    private javax.swing.JButton followers_button;
    private javax.swing.JButton following_button;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JLabel label;
    private java.awt.List list1;
    private javax.swing.JLabel localSearched_txt;
    private javax.swing.JButton logout_button;
    private javax.swing.JButton mytwitts_btn;
    private javax.swing.JLabel nameSearched_txt;
    private javax.swing.JLabel newmsg_lbl;
    private javax.swing.JTextField searchUsr_txt;
    private javax.swing.JButton search_button;
    private javax.swing.JButton timeline_button;
    private javax.swing.JTextArea timetable_txt;
    private javax.swing.JButton tweet_button;
    private javax.swing.JTextField tweet_txt;
    private javax.swing.JScrollPane txt_txt;
    private javax.swing.JLabel username_txt;
    // End of variables declaration//GEN-END:variables
}
